<!DOCTYPE html>
<html>

<include file="./Application/Admin/View/common/css-js.html"/>

<body class="gray-bg">
<div style="padding-left:1%">
    <br>
    <h2>用户</h2>
    <span style="display:block;padding-bottom:0.5%;font-size:18Px">用户量:  <span class='text-danger'>{$count}</span>
    </span>
    <div style="border:1px solid #CCCCCC;"></div>
</div>
<form method="post" action="/index.php/admin/index/search">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="btn-group btn-group-sm" style="float:left;">
            <button class="btn btn-default btn-sm" type="button" data-toggle="refresh"><a href="/index.php/admin/index/userlist"><i class="fa fa-refresh"></i></a></button>

        </div>
        <div style="float:left">

            <select onchange="selectChange(this.options[this.selectedIndex].text)" id="select" onchange="selectChange()" name="select" style="width:100px;height:30px;padding:0 5px;">
                <option value="">请选择</option>
                <option value="register_name">用户姓名</option>
                <option value="upper_upper_agent_tel">上上上一级手机号</option>
                <option value="upper_agent_tel">上上一级手机号</option>
                <option value="agent_tel">上一级手机号</option>
                <option value="certificate">身份证号</option>
                <option value="tel">手机号</option>
                <option value="bind_id">员工工号</option>
                <input type="hidden" id="select_content" name="select_name">
            </select>
            <div style="float:right">
                <input type="text"  name="keyword" value="" style="width:300px;height:30Px" placeholder="请输入关键词">
                <span>
            <button class="btn btn-sm btn-primary" type="submit" id="search" onclick="searchuser()"> 搜索</button>
        </span>
            </div>

        </div>
    </div>

</form>
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>用户列表</h5>
                </div>
                <div class="ibox-content">

                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="20">
                        <thead>
                        <tr>

                            <th data-toggle="true">用户id</th>
                            <th>绑定员工id</th>
                            <!--<th>绑定门店id</th>-->
							<th>绑定门店名称</th>
                            <th>一级推荐人id</th>
                            <th>一级推荐人手机号</th>
                            <th>二级推荐人id</th>
                            <th>二级推荐人手机号</th>
                            <th>三级推荐人id</th>
                            <th>三级推荐人手机号</th>
                            <!-- <th>用户姓名</th>
                            <th>身份证号</th> -->
                            <th>手机号</th>
                            <!-- <th>密码</th> -->
                            <th>用户注册时间</th>
                            <th>所得奖金总数</th>
                            <th>昨日所得奖金</th>
                            <th>审核状态</th>
                            <th>用户状态</th>
                            <th>前台权限</th>
                            <th>操作</th>
                            <th>员工绑定</th>
                        </tr>
                        </thead>
                        <tbody >
                        <volist name="user" id="vo">
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.bind_id}</td>
                                <!--<td>{$vo.bind_did}</td>-->
								<td>{$vo.bind_name}</td>
                                <td>{$vo.agent_id}</td>
                                <td>{$vo.agent_tel}</td>
                                <td>{$vo.upper_agent_id}</td>
                                <td>{$vo.upper_agent_tel}</td>
                                <td>{$vo.upper_upper_agent_id}</td>
                                <td>{$vo.upper_upper_agent_tel}</td>
                                <!-- <td>{$vo.register_name}</td>
                                <td>{$vo.certificate}</td> -->
                                <td>{$vo.tel}</td>
                                <!-- <td>{$vo.password}</td> -->
                                <td>{$vo.create_time}</td>
                                <td>{$vo.commissions}</td>
                                <td>{$vo.commission}</td>
                                <td>
                                    <if condition="$vo.isok eq 1"><span style=' color:green'>已通过</span>&nbsp;&nbsp;<a href="/index.php/admin/index/isnotok?id={$vo.id}">驳回</a>
                                        <else/><span style=' color:red'>未通过</span>&nbsp;&nbsp;<a href="/index.php/admin/index/isok?id={$vo.id}">通过</a>
                                    </if>
                                </td>
                                <td>
                                    <if condition="$vo.lock eq 1"><span style=' color:green'>已解锁</span>&nbsp;&nbsp;<a href="/index.php/admin/index/lock?id={$vo.id}">锁定</a>
                                        <else/><span style=' color:red'>已锁定</span>&nbsp;&nbsp;<a href="/index.php/admin/index/open?id={$vo.id}">解锁</a>
                                    </if>
                                </td>

                                <td>
                                    <if condition="$vo.auth eq 1"><span style=' color:green'>已开通</span>&nbsp;&nbsp;<a href="/index.php/admin/index/noauth?id={$vo.id}">关闭</a>
                                        <else/><span style=' color:red'>已关闭</span>&nbsp;&nbsp;<a href="/index.php/admin/index/auth?id={$vo.id}">开通</a>
                                    </if>
                                </td>
                                <td><a href="/index.php/admin/index/edituser?id={$vo.id}"><i class="fa fa-check text-navy"></i> 修改</a>
                                    <a href="/index.php/admin/index/deluser?id={$vo.id}">  删除</a>
                                </td>
                                <td><a href="/index.php/admin/index/bind?id={$vo.id}">员工绑定</a></td>
                            </tr>
                        </volist  >
                        </tbody>
                        <tfoot>
                        <td colspan="20" style="text-align: center;font-size: 15px">
                            {$page}
                            <!-- <div class="green-black"><{$page}><div/> -->
                        </td>
                        </tfoot>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {

        $('.footable').footable();

    });
    function selectChange(select)
    {
        document.getElementById("select_content").value=select;
    }
    function searchuser()
    {
        var select = document.getElementById("select");
        var index = select.selectedIndex;
        var value = select.options[index].value;
        if(value=="")
        {
            document.getElementById("search").disabled="ture";
        }
    }
</script>

</body>

</html>
